import type { DialogModel } from "@/type/BaseType";
import { reactive } from "vue";

export default function useDialog() {
    const dialog = reactive<DialogModel>({
        title: '',
        visible: false,
        width: 600,
        height: 400

    })
    //展示
    const onShow = () => {
        dialog.visible = true
    }
    //关闭
    const onClose = () => {
        dialog.visible = false
    }
    //新增
    const onConfirm = () => {
        dialog.visible = false
    }
    return { dialog, onShow, onClose, onConfirm }

}
